﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05_SortingStringArray
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] array = {"as", "adsfasdfasdf", "asdf", "a" };
          
           //var result = from elem in array
           //             orderby elem.Length
           //             select elem; 

           var result = array.OrderBy(x => x.Length);        //tuka ne moje da napisha string[] zashtoto vryshta nqkva prostotiq 

            //var result = (from elem in array
            //              orderby elem.Length
            //              select elem).Reverse();

            foreach (var item in result)
            {
                Console.WriteLine(item);
            }
        }
    }
}
